package com.example.pwj.ffstudy.comm;

import android.app.Application;
import android.content.Context;
import android.support.multidex.MultiDex;
import android.support.multidex.MultiDexApplication;

import com.blankj.utilcode.util.Utils;
import com.example.pwj.ffstudy.http.Api;

/**
 * Created by pwj on 2017/8/21.
 */

public class MyApp extends MultiDexApplication {
    public static Context sContext;
    private AppComponent appComponent;

    @Override
    public void onCreate() {
        super.onCreate();
        sContext = this;
        Utils.init(this);
        appComponent = DaggerAppComponent.builder()
                .appModule(new AppModule(this))
                .build();

    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(this);
    }

    public AppComponent getAppComponent() {
        return appComponent;
    }
}
